﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Garlic.BLL.Common;
using DAL.SystemManagement;

namespace BLL.SystemManagement
{
    public  class ServiceRouteTreeBLL : BaseManager
    {
        public static DataTable GetRoutes1(int userID,string userType)
        {
            return ServiceRouteTreeDAL.GetRoutes1(userID, userType);
        }
        public static DataTable GetRoutes1_SL(int userID, string userType)
        {
            return ServiceRouteTreeDAL.GetRoutes1_SL(userID, userType);
        }

        /// <summary>
        /// 得到船公司名称。
        /// </summary>
        /// <param name="sln_id"></param>
        /// <returns></returns>
        public static string GetVesselName(int sln_id)
        {
            string vessalName = string.Empty;
            foreach (DataRow item in ServiceRouteTreeDAL.GetVesselName(sln_id).Rows)
            {
                vessalName = item["cst_cstmnm"].ToString();
            }
            return vessalName;
        }

        public static DataTable GetRoutes2(int userID, string userType, int sln_srt_id)
        {
            return ServiceRouteTreeDAL.GetRoutes2(userID, userType, sln_srt_id);
        }

        public static DataTable GetRoutes3(int userID, string userType, int sln_srt_id)
        {
            return ServiceRouteTreeDAL.GetRoutes3(userID, userType, sln_srt_id);
        }

        public static int GetSt_sea_routesBysrt_id(string srt_rtchnnm)
        {
            return ServiceRouteTreeDAL.GetSt_sea_routesBysrt_id(srt_rtchnnm);
        }
    }
}
